import pandas as pd

f2 = open('analysis3.txt','w',encoding='utf-8')
f = pd.read_csv('recruit_data.csv')
softWare = f[f['post'].str.contains('大数据')]
company = softWare['nature'].value_counts()
data = f['nature'].value_counts()/company
ans = data.fillna(0)
keys = ans.index
for v in range(len(ans)):
    f2.write(keys[v]+':'+'{:.2f}%'.format(ans[v])+'\n')
f2.close()